var app = getApp()
Page({
  data: {
    footer: {
      i_home: "../images/button1.png",
      i_tel: "../images/button2.png",
      i_chat: "../images/button4.png",
      i_add: "../images/button5on.png",
    },
    userInfo: {},
    arraydetail: [],
    windowWidth: 375,
    windowHeight: 571,
    scrollTop: 0,
    scrollHeight: 0,
    pageIndex: 1,
    orderType: 0, //	0＝全部 1=待付款 2=待发货 3=已发货 4=待评价 5=退款
    navbar: ['全部', '待付款', '待发货', '待收货', '待评价'],
    loadding: true,
    userListInfo: [{
      icon: '../images/my_list_03.jpg',
      showstatus: true,
      url: 'addresslist',
      text: '收货地址',
      isunread: true,
      unreadNum: 1
    }],
    user_list_left: [{
      url: 'orderlist?orderType=1',
      icon: '../images/my_02.jpg',
      id: '1',
      text: '待付款'

    },
    {
      url: 'orderlist?orderType=3',
      icon: '../images/my_01.jpg',
      id: '3',
      text: '待收货'

    }],
    user_list_right: [
      {
        url: 'orderlist?orderType=4',
        icon: '../images/my_02.jpg',
        id: '4',
        text: '已完成'

      }, {
        url: 'orderlist?orderType=0',
        icon: '../images/my_01.jpg',
        id: '0',
        text: '全部订单'
      }
    ],

    author: 'Lotus'
  },
  clicklist: function (e) {
    var that = this;
    var url = e.target.dataset.url;
    wx.navigateTo({
      url: url
    })
  },
  onLoad: function (options) {
    console.log(options);
    var that = this;
    if (options.fromInviteCode) {
      app.globalData.fromInviteCode = options.fromInviteCode;
    }



    app.appstart();
    




    console.log(10);
    console.log(app.globalData.userInfo);

   

    wx.getSystemInfo({
      success: function (res) {
        that.setData({
          winWidth: res.windowWidth,
          winHeight: res.windowHeight
        });
      }
    });
    that.setData({ userInfo: app.globalData.userInfo })
  }
})